package com.hznc.wcs.enums;

public enum ItemtypeEnum {
    project("1", "项目合同类"),
    sales("2", "销售费用类"),
    noCost("3", "无成本类"),
    homemade("4", "自制类");

    private final String code;
    private final String desc;

    ItemtypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (ItemtypeEnum itemtypeEnum : ItemtypeEnum.values()) {
            if (itemtypeEnum.getCode().equals(code)) {
                return itemtypeEnum.getDesc();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
